-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This pull request introduces library feature for leanify. #72
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for the PR, but I don't think this feature should be part of leanify, either whatever code calling leanify or a standalone wrapper is a more suitable place, something like ccache. |
Thank you for answer. I also share same doubts about this feature in leanify. I played with self writed cache that use leanify to process. But after severall experiments I come up with idea that cache feature should be in leanify. This is best for overall processing speed, because no overhead for interprocess communications at all. Also library feature is optional and won't break existing workflows. So I will be happy to make it part of such great tool. |
I doubt the interprocess overhead matters much in this case. |
04c8d17
to
224b0ee
Compare
224b0ee
to
f52b850
Compare
Hi @JayXon, I have merged master and fixed some conflicts. And it will be nice if you apply this PR. We have been used this feature in our company for a year+ and it greatly increased our productivity when we apply leanify to a built project. And no matter how huge is build, every next build and following leanifying is very fast. Thank you in advance. |
@JayXon can you reconsider your opinion on this PR? |
Useful feature to increase optimization speed.
Use case one.
I have several projects that shares common resources. In my case five projects built for different platforms. That projects shares a lot of texture atlases.
And I need to leanify them all.
Leanifying one project takes 20 minutes.
For five projects it will take something around 100 minutes. This is bad.
With library feature, I need 20 minutes to fill library first time, following leanifying just reuse already compressed data and copy it.
Use case two.
I made pre-master build of web application and leanified it with library enabled. And during final test I find small bug and should rebuid application again.With library feature re-leanifying of my web application is fast as file copy.
Use case three.
I will be able to setup incremental leanifying of my projects just add leanify with enabled library in post build. First build will be slow, but next one will fast.
By default library feature is disabled.
To enable it use -l switch followed by path to library.
For example to leanify everything in current directory with custom library folder just use this command:
leanify -l c:\leanify_library .
or
leanify -l ~\leanify_library .
If you don't care about place for your library folder, just use * symbol
Example:
leanify -l * .
This will use global library folder in temp directory.
Full path to library will be printed in terminal.
WARNING! Library folder always grows, leanify never delete anything, you should clean it from time to time.
Bonus! Library feature also works in parallel mode.
Note:
Library use SHA1 hash of input file content to find already leanifyed data. So if you started leanifying with enabled library on folder that contains already leanifyed data, you did not noticed speed increase this is because library contains only hashes of source files. And this action doubles library size.